package chapters
{
	import flash.utils.Dictionary;
	
	import slices.TimeSlice;
	import globals.$log;
	
	public class Branch extends TimeSlice
	{
		public var map:Dictionary;
		
		public function Branch(map:Dictionary)
		{
			super();
			this.map = map;
		}
		
		override public function onStart():void {
			var next:TimeSlice = map[getInput("result")];
			if (next != null) {
				appendNext(next);
				isEnd = true;
			} else {
				$log.error("no next");
			}
		}
	}
}